package com.huonan.component.mysql;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TBDictonaryRepository extends JpaRepository<TbDictionary, Integer> {
    List<TbDictionary> findByName(String name);

    @Query(value = "select * from tb_dictionary where id>:id",nativeQuery = true)
    List<TbDictionary> findListById(@Param("id") int id);
}